package net.huashitong.ssydt.exam.entity.vo;


import net.huashitong.ssydt.exam.entity.SsExamQuestionOption;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author hemj
 * @version 2017/8/25
 */
public class ExamQuestion implements Serializable {

	private Date gmtCreate;

	private Date gmtModified;

	private Long id;

	@NotBlank(message = "问题不能为空")
	private String question;//问题

	private String analysis;//解析

	@NotNull(message = "难度系数不能为空")
	@Range(min = 0, max = 5, message = "难度系数范围(0~5)")
	private BigDecimal coefficient;//难度系数

	@NotBlank(message = "所需日期不能为空")
	private String belongDate;//所需日期

	@NotBlank(message = "地区类型不能为空")
	private String areaType;//地区类型

	private String area;//地区

	@NotBlank(message = "话题不能为空")
	private String topic;//话题

	@NotNull(message = "是否重点题不能为空")
	private Byte isEmphasis;//是否重点题

	@NotNull(message = "是否时事卡不能为空")
	private Byte isCard;//是否时事卡

	private Long testNumber;//作答人数

	private Long correctNumber;//正确人数

	@NotBlank(message = "题目类型不能为空")
	private String questionType;//题目类型

	@NotEmpty(message = "选项列表不能为空")
	private List<SsExamQuestionOption> options;

	public Date getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	public Date getGmtModified() {
		return gmtModified;
	}

	public void setGmtModified(Date gmtModified) {
		this.gmtModified = gmtModified;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getQuestion() {
		return question;
	}

	public void setQuestion(String question) {
		this.question = question;
	}

	public String getAnalysis() {
		return analysis;
	}

	public void setAnalysis(String analysis) {
		this.analysis = analysis;
	}

	public BigDecimal getCoefficient() {
		return coefficient;
	}

	public void setCoefficient(BigDecimal coefficient) {
		this.coefficient = coefficient;
	}

	public String getBelongDate() {
		return belongDate;
	}

	public void setBelongDate(String belongDate) {
		this.belongDate = belongDate;
	}

	public String getAreaType() {
		return areaType;
	}

	public void setAreaType(String areaType) {
		this.areaType = areaType;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public String getTopic() {
		return topic;
	}

	public void setTopic(String topic) {
		this.topic = topic;
	}

	public Byte getIsEmphasis() {
		return isEmphasis;
	}

	public void setIsEmphasis(Byte isEmphasis) {
		this.isEmphasis = isEmphasis;
	}

	public Byte getIsCard() {
		return isCard;
	}

	public void setIsCard(Byte isCard) {
		this.isCard = isCard;
	}

	public Long getTestNumber() {
		return testNumber;
	}

	public void setTestNumber(Long testNumber) {
		this.testNumber = testNumber;
	}

	public Long getCorrectNumber() {
		return correctNumber;
	}

	public void setCorrectNumber(Long correctNumber) {
		this.correctNumber = correctNumber;
	}

	public String getQuestionType() {
		return questionType;
	}

	public void setQuestionType(String questionType) {
		this.questionType = questionType;
	}

	public List<SsExamQuestionOption> getOptions() {
		return options;
	}

	public void setOptions(List<SsExamQuestionOption> options) {
		this.options = options;
	}

	@Override
	public String toString() {
		final StringBuilder sb = new StringBuilder("ExamQuestion{");
		sb.append("gmtCreate=").append(gmtCreate);
		sb.append(", gmtModified=").append(gmtModified);
		sb.append(", id=").append(id);
		sb.append(", question='").append(question).append('\'');
		sb.append(", analysis='").append(analysis).append('\'');
		sb.append(", coefficient=").append(coefficient);
		sb.append(", belongDate='").append(belongDate).append('\'');
		sb.append(", areaType='").append(areaType).append('\'');
		sb.append(", area='").append(area).append('\'');
		sb.append(", topic='").append(topic).append('\'');
		sb.append(", isEmphasis=").append(isEmphasis);
		sb.append(", isCard=").append(isCard);
		sb.append(", testNumber=").append(testNumber);
		sb.append(", correctNumber=").append(correctNumber);
		sb.append(", questionType='").append(questionType).append('\'');
		sb.append(", options=").append(options);
		sb.append('}');
		return sb.toString();
	}
}